package ordersList;

import interfaces.ClientComm;
import interfaces.MicroTraderClient;
import interfaces.Order;

public class OrdersManager implements MicroTraderClient {

	private OrderList myOrdersList;
	private OrderList publicOrdersList;
	
	
	public OrdersManager(){
		
		myOrdersList = new MyOrdersList();
		publicOrdersList = new PublicOrdersList();
		
		insert_test_values_on_my_orders_list();
		insert_test_values_on_public_orders_list();
		
	}
	
	
	private void insert_test_values_on_public_orders_list() {
		
		publicOrdersList.addOrder(Order.createSellOrder("joao", "PCG", 10, 2));
		publicOrdersList.addOrder(Order.createSellOrder("carlos", "PChG", 20, 2));
		publicOrdersList.addOrder(Order.createSellOrder("americo", "PCuG", 30, 2));
	}


	private void insert_test_values_on_my_orders_list() {
		myOrdersList.addOrder(Order.createSellOrder("cesar", "PCG", 10, 2));
		myOrdersList.addOrder(Order.createSellOrder("cesar", "MGX", 20, 2.5));
		myOrdersList.addOrder(Order.createSellOrder("cesar", "GRS", 40, 3.8));
		myOrdersList.addOrder(Order.createSellOrder("cesar", "RYH", 50, 7.8));		
	}


	public OrderList getMyOrdersList() {
		return myOrdersList;
	}
	
	public OrderList getPublicOrdersList() {
		return publicOrdersList;
	}


	@Override
	public void start(ClientComm clientComm) {
		// TODO Auto-generated method stub
		
	}
	
	
	
	
	
	
}
